#include "log.hpp"
#include "comm.hpp"

int main()
{
   int fd=open(FIFO_FILE,O_WRONLY);//打开管道文件
   if(fd<0)
   {
    perror("open");
    exit(FIFO_OPEN_ERR);
   }
  
   cout<<"client open file done"<<endl;

   string s;
   while(true)
   {
    cout<<"client please enter@ ";
    getline(cin,s);
    int id=write(fd,s.c_str(),s.size());
   }
   close(fd);

    return 0;
}